<template>
	<view>
		<u-popup :show="show" round="24rpx" mode="center" :safeAreaInsetBottom="false">
			<view class="contentBox">
				<image class="popup-close" src="../static/common/icon_close.png" @click="$emit('close')" />
				<view class="popup-title">查看微信</view>
				<view class="wechat-box">{{userWechat||'未添加微信信息'}}</view>
				<view class="tips-box">
					搜索微信不存在72小时内可点击举报，系统将在核实后返还相关次数
				</view>
				<view class="tips-box1">添加时<text style="color: #F169F6;">备注"缘分"</text>可以更快通过好友验证哦~</view>
				<view class="button-group">
					<view class="button1" @click="$u.throttle(copyWechat,2000)">
						复制微信号
					</view>
				</view>
				<view class="warning-text">
					<u-icon name="info-circle" color="#FF3E3E" size="14" style="margin-right: 12rpx;"></u-icon>
					请勿轻易转账，警惕裸露诈骗、杀猪盘、下载第三方APP，涉嫌色情等违禁内容请点击举报
				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default {
		name: "WeChatPopup1",
		data() {
			return {};
		},
		props: {
			show: {
				type: Boolean,
				default: false //是否显示
			},
			user_id: {
				type: [Number, String],
				default: null //解锁用户id
			},
			userWechat: {
				type: [Number, String],
				default: null //微信信息
			}
		},
		// watch: {
		// 	show(value) {
		// 		if (value == true) {
		// 			this.getUserHome()
		// 		}
		// 	},
		// },
		methods: {
			copyWechat() {
				if (!this.userWechat) {
					return this.$Toast('未添加微信信息')
				}
				uni.setClipboardData({
					data: this.userWechat,
					success() {
						this.$Toast('复制成功')
					}
				})
			},
			// getUserHome() {
			// 	this.$Api['user'].getUserHome({
			// 		user_id: this.user_id
			// 	}).then(res => {
			// 		this.userInfo = res.data
			// 	})
			// },
		}
	}
</script>

<style lang="scss" scoped>
	.contentBox {
		width: 90vw;
		min-height: 440rpx;
		box-sizing: border-box;
		padding: 38rpx 44rpx 82rpx;
		box-shadow: 0rpx 4rpx 32rpx 0rpx #FFF0FD;
		border-radius: 32rpx;
		background: linear-gradient(180deg, #FFDAF5 0%, #FFFFFF 20%);
		position: relative;

		.popup-close {
			position: absolute;
			right: 0;
			top: -120rpx;
			width: 88rpx;
			height: 88rpx;
		}

		.popup-title {
			font-weight: 600;
			font-size: 44rpx;
			color: #323334;
			margin-bottom: 50rpx;
			text-align: center;
		}

		.wechat-box {
			width: 602rpx;
			height: 88rpx;
			line-height: 88rpx;
			text-align: center;
			background: #F8F8F8;
			border-radius: 16rpx;
			font-weight: 500;
			font-size: 36rpx;
			color: #F169F6;
		}

		.tips-box {
			margin-top: 20rpx;
			padding: 0 20rpx;
			font-size: 28rpx;
			color: #9A9A9A;
		}

		.tips-box1 {
			margin-top: 64rpx;
			font-size: 30rpx;
			color: #606060;
		}

		.button-group {
			margin-top: 100rpx;

			.title {
				display: block;
				color: #ffffff;
				text-decoration: none;
			}

			.button1 {
				display: flex;
				align-items: center;
				justify-content: center;
				margin: 0 auto;
				width: 600rpx;
				height: 88rpx;
				font-weight: bold;
				font-size: 30rpx;
				color: #FFFFFF;
				text-align: center;
				line-height: 88rpx;
				background: linear-gradient(135deg, #FE93BF 0%, #A27AFF 100%);
				border-radius: 44rpx;
			}
		}

		.warning-text {
			display: flex;
			font-size: 28rpx;
			color: #FF3E3E;
			margin-top: 30rpx;
			align-items: start;
		}
	}
</style>